<template>
  <div class="studentProfile-container">
    <el-avatar
      :size="220"
      shape="square"
      :src="
        currentStuInfo.headimgurl
          ? currentStuInfo.headimgurl
          : 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png'
      "
    >
    </el-avatar>
    <el-descriptions title="学员资料" direction="vertical" :column="3" border>
      <el-descriptions-item label="sId">{{
        currentStuInfo.sId
      }}</el-descriptions-item>
      <el-descriptions-item label="姓名">
        <el-tag
          style="
            height: 32px;
            line-height: 30px;
            background-color: #67c23a;
            color: white;
          "
          size="small"
          >{{ currentStuInfo.name }}</el-tag
        ></el-descriptions-item
      >
      <el-descriptions-item label="年龄">{{
        currentStuInfo.age
      }}</el-descriptions-item>
      <el-descriptions-item label="班级">
        {{ currentStuInfo.class }}</el-descriptions-item
      >
      <el-descriptions-item label="学历"
        ><el-tag size="small">{{
          currentStuInfo.degree
        }}</el-tag></el-descriptions-item
      >
      <el-descriptions-item label="项目地址">
        {{ currentStuInfo.productUrl }}</el-descriptions-item
      >
      <el-descriptions-item label="描述">
        {{ currentStuInfo.description }}</el-descriptions-item
      >
      <el-descriptions-item label="城市"
        >{{ currentStuInfo.city }}
      </el-descriptions-item>
      <el-descriptions-item label="创建时间"
        >{{ currentStuInfo.cTime }}
      </el-descriptions-item>
    </el-descriptions>
    <el-button
      type="primary"
      @click="$router.push('/studentmanager/studentproduct')"
      >点击返回列表</el-button
    >
  </div>
</template>

<script>
export default {
  meta: {
    title: 'xyzl',
    icon: 'iconfont icon-shuju1'
  },
  data() {
    return {
      currentStuInfo: {} // 当前学员信息
    }
  },
  mounted() {
    console.log(this.$route.query)
    // 接收传递过来的学员信息
    this.currentStuInfo = this.$route.query.row
  }
}
</script>

<style scoped lang="less">
/deep/ .el-descriptions-item__label.is-bordered-label {
  font-weight: 700 !important;
}
</style>
